<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>竞赛信息详情</title>
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/swiper.min.css">
    <link rel="stylesheet" href="./css/bootstrap.min.css">
    <link rel="stylesheet" href="./css/main.css">
    <script src="js/jquery.min.js"></script>
    <script src="js/swiper.min.js"></script>
    <script src="js/requestUrl.js"></script>
    <script src="./js/layer/layer.js"></script>
    <style>
        /*.btn {*/
        /*display: inline-block;*/
        /*background: #009933;*/
        /*color: #fff;*/
        /*}*/

        /*.btn:hover {*/
        /*color: #fff;*/
        /*}*/
        .aa {
            border: 1px solid transparent;
            outline: none;
            font-weight: 400;
            background: #009933;
            color: #fff;
            height: 35px;
            line-height: 25px;
            padding: 5px 15px;
            border-radius: 5px;
            margin-left: 15px;
        }

        .disabled {
            color: #c0c4cc;
            cursor: not-allowed;
            background-image: none;
            background-color: #fff;
            border-color: #ebeef5;
        }
    </style>
</head>

<body>
    <!-- 头部导航 -->
    <div class="head">
        <div style="background: #006633">
            <div class="container">
                <div style="line-height: 30px;color:#fff;position: absolute;font-size:12px;">山东省足球运动协会欢迎您！</div>
                <div class="do">
                    <div class="does1" style="display: block;">
                        <a href="http://newtest.sdfa.org.cn/footballAssociation/zuxie/login.html"><span>登录</span></a>
                        |
                        <a href="http://newtest.sdfa.org.cn/footballAssociation/zuxie/register.html"><span>注册</span></a>
                    </div>
                    <div class="does2" style="display:none">
                        <span>欢迎<span id="telphone" style="margin:0"></span></span>
                        |
                        <span><a href="http://newtest.sdfa.org.cn/footballAssociation/zuxie/personal.html"
                                id="nickname">个人中心</a></span>
                        |
                        <span class="logout" style="cursor: pointer;">退出</span>
                    </div>
                </div>
            </div>
        </div>
        <div class="head-choose">
            <div class="container">
                <img src="http://newtest.sdfa.org.cn/webfile//public/headicon.png"
                    style="position: absolute;top: 15px;">
                <a href="http://newtest.sdfa.org.cn/">
                    <div class="headtext">
                        <div class="headtext1">山东省足球运动协会</div>
                        <div class="headtext2">SHANDONG FOOTBALL ASSOCIATION</div>
                    </div>
                </a>
                <div style="display:inline-block;margin-left:302px">
                    <div class="choosea">
                        <a href="http://newtest.sdfa.org.cn/index.html?id=67">
                            <div>首页</div>
                        </a>
                        <div class="choosea-2">
                        </div>
                    </div>
                    <div class="choosea">
                        <a href="http://newtest.sdfa.org.cn/notice.html?id=68">
                            <div>通知公告</div>
                        </a>
                        <div class="choosea-2">
                            <a href="http://newtest.sdfa.org.cn/notice.html?id=68&amp;item=1">
                                <div>公告规程</div>
                            </a>
                            <a href="http://newtest.sdfa.org.cn/notice.html?id=68&amp;item=2">
                                <div>政策法规</div>
                            </a>
                        </div>
                    </div>
                    <div class="choosea">
                        <a href="javascript:void(0);">
                            <div>足球专区</div>
                        </a>
                        <div class="choosea-2">
                            <a href="http://newtest.sdfa.org.cn/soccernotice.html?id=70">
                                <div>女足专区</div>
                            </a>
                            <a href="http://newtest.sdfa.org.cn/prefecture.html?id=71&item=2&child=1">
                                <div>青少年足球</div>
                            </a>
                            <a href="http://newtest.sdfa.org.cn/soccernotice.html?id=72">
                                <div>社会足球</div>
                            </a>
                        </div>
                    </div>
                    <div class="choosea">
                        <a href="http://newtest.sdfa.org.cn/otherplace.html?id=87">
                            <div>各地足协</div>
                        </a>
                        <div class="choosea-2">
                        </div>
                    </div>
                    <div class="choosea">
                        <a href="http://newtest.sdfa.org.cn/shopping/index.htm" target="_blank">
                            <div>商城</div>
                        </a>
                        <div class="choosea-2" target="_blank">
                        </div>
                    </div>
                    <div class="choosea">
                        <a href="http://newtest.sdfa.org.cn/aboutus.html?id=77">
                            <div>关于我们</div>
                        </a>
                        <div class="choosea-2">
                        </div>
                    </div>
                </div>
                <form action="result.html" method="post">
                    <div class="input-group">
                        <input type="text" name="word" value="" autocomplete="off" class="form-control"
                            placeholder="请输入您要搜索的内容">
                        <span class="glyphicon glyphicon-search" onclick="$('.head form').submit()"></span>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <div class="clear"></div>
    <div class="center">
        <div class="position">当前位置：<a href="http://newtest.sdfa.org.cn/footballAssociation/zuxie/contest_list.html"
                class="go_back">竞赛信息</a>>竞赛详情
        </div>
        <div class="detail">
            <h1 class="tit"></h1>
            <div class="banner swiper-container">
                <ul class="swiper-wrapper"></ul>
                <div class="swiper-pagination"></div>
                <div class="swiper-button-next"></div>
                <div class="swiper-button-prev"></div>
            </div>
            <div class="right">
                <ul>
                    <li class="t">赛事类型：<span></span></li>
                    <li class="d">比赛日期：<span></span></li>
                    <li class="a">举办城市：<span></span></li>
                    <li class="z">主办单位：<span></span></li>
                    <li class="c">承办单位：<span></span></li>
                    <!--style="display: none;"-->
                    <li>报名：
                        <!--style="border: none;background: #ffffff"-->
                        <!--onclick="javascrtpt:window.location.href='http://newtest.sdfa.org.cn/footballAssociation/footBallAdmin/index.html'"-->
                        <!--0 显示-->
                        <button type="button" class="aa">我要报名
                            <!--<<span class="btn">-->
                            <!--</span>-->
                        </button>

                    </li>
                </ul>
            </div>
            <div class="clear"></div>
            <div class="desc">
                <span>赛事简介：</span>
                <p></p>
            </div>
        </div>
    </div>
    <!-- 底部 -->
    <div class="footer" style="min-width: 100%;">
        <div>
            版权所有：山东省足球运动协会官方网站
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            ICP经营许可证：鲁ICP备15020327号
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            山东乐体网络科技有限公司
        </div>
    </div>
    <script>
        // 全局缓存global_nickName
        var global_nickName = sessionStorage.nickName;
        var global_userId = sessionStorage.userId;
        if (global_userId) {
            $('.do .does1').css('display', 'none')
            $('.do .does2').css('display', 'block')
        } else if (global_nickName == undefined || global_nickName == "") {
            $('.do .does1').css('display', 'block')
            $('.do .does2').css('display', 'none')
        }
        var global_tel = sessionStorage.tel;
        $("#telphone").text(global_tel)
        //退出
        $('.logout').click(function () {
            myAjax('/user/logout', {},
                function (data) {
                    // console.log(data)
                    if (data.msg == 0) {
                        sessionStorage.clear()
                        location.reload()
                    }
                },
                function (err) {
                    console.log(err)
                })
        });
        var swiper = new Swiper('.swiper-container', {
            pagination: {
                el: '.swiper-pagination',
                type: 'fraction',
            },
            navigation: {
                nextEl: '.swiper-button-next',
                prevEl: '.swiper-button-prev',
            },
        });
        // 获取到上个页面传过来的id
        var str = window.location.href
        var num = str.indexOf("?")
        var arr = str.substr(num + 1).split("&");
        var obj = {};
        var newcompetitionId
        for (var i = 0; i < arr.length; i++) {
            var item = arr[i].split("=");
            obj[item[0]] = item[1];
        }
        var contest_id = obj.id
        $(document).ready(function () {
            myAjax('/user/competition/findCompetitionById', {
                    id: contest_id,
                },
                function (data) {
                    // console.log(data)
                    newcompetitionId = data.competition.newcompetitionId
                    $('.tit').html(data.competition.title);
                    $('.t span').html(data.competition.type);
                    $('.d span').html(data.competition.date);
                    $('.a span').html(data.competition.city);
                    $('.z span').html(data.competition.organizers);
                    $('.c span').html(data.competition.contractor);
                    $('.desc p').html(data.competition.content);
                    var list = data.competition.imgUrl;
                    // console.log(data.competition.imgUrl)
                    var str = ""
                    for (var i = 0; i < list.length; i++) {
                        str += "<li class=\"swiper-slide\"><img src=\"" + list[i].imgUrl + "\"></li>"
                    }
                    $('.swiper-wrapper').html(str);
                },
                function (err) {
                    // console.log(err)
                })

        })
        $(".aa").on("click", function () {
            myAjax('/user/competition/checkNewCompetitionApplyById', {
                    id: newcompetitionId,
                },
                function (data) {
                    if (data.msg == 0) {
                        window.location.href =
                            "http://newtest.sdfa.org.cn/footballAssociation/footBallAdmin/index.html"
                    } else {
                        layer.msg(data.msg)
                        return false
                    }
                },
                function (err) {
                    console.log(err)
                })
        })
    </script>
</body>

</html>